home *** CD-ROM | disk | FTP | other *** search
/ Merciful 5 / Merciful - Disc 5.iso / software / p / pcqpascalv1.2d.lha / Include / DOS / Record.i < prev    next >
Text File  |  1997-05-06  |  948b  |  35 lines

  1.  
  2. {$I   "Include:DOS/DOS.i"}
  3.  
  4. CONST
  5. {     Modes for LockRecord/LockRecords() }
  6.        REC_EXCLUSIVE          = 0;
  7.        REC_EXCLUSIVE_IMMED    = 1;
  8.        REC_SHARED             = 2;
  9.        REC_SHARED_IMMED       = 3;
  10.  
  11. {     struct to be passed to LockRecords()/UnLockRecords() }
  12.  
  13. Type
  14.        RecordLock = Record
  15.         rec_FH    : BPTR;         {     filehandle }
  16.         rec_Offset,               {     offset in file }
  17.         rec_Length,               {     length of file to be locked }
  18.         rec_Mode  : Integer;      {     Type of lock }
  19.        END;
  20.        RecordLockPtr = ^RecordLock;
  21.  
  22.  
  23. FUNCTION LockRecord(Datei : FileHandle; offset, num, mode, timeout : Integer) : Boolean;
  24.     External;
  25.  
  26. FUNCTION LockRecords(RL : RecordLockPtr; timeout : Integer) : Boolean;
  27.     External;
  28.  
  29. FUNCTION UnLockRecord(datei : FileHandle; offset, num : Integer) : Boolean;
  30.     External;
  31.  
  32. FUNCTION UnLockRecords(RL : RecordLockPtr) : Boolean;
  33.     External;
  34.  
  35.